package com.cloud.controller;

import com.cloud.service.ComputeClient;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @描述: 消费者
 * @类名:
 * @作者: yangshuang
 * @创建时间: 2017/6/26 16:14
 * @版本: v1.0
 */
@Log4j
@RestController
@RequestMapping(value = "/consumer")
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class ConsumerController {
   private final ComputeClient computeClient;

    @RequestMapping(value = "/add",method = RequestMethod.GET)
    public Integer add(){
        return computeClient.add(10,20);
    }
}

